<layout name="layoutP"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Uploadify Example Script</title>
<link href="__PUBLIC__/example/css/default.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/example/css/uploadify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/example/scripts/swfobject.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/jquery.confirm.js"></script>

<script type="text/javascript" src="__PUBLIC__/example/scripts/jquery.uploadify.v2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#uploadify").uploadify({
		'uploader'       : '__PUBLIC__/example/scripts/uploadify.swf',
		'script'         : '__PUBLIC__/example/scripts/uploadify.php',
		'cancelImg'      : '__PUBLIC__/example/cancel.png',
		'folder'         : '__PUBLIC__/uploads/{$project}/{$level}',
		'queueID'        : 'fileQueue',
		'auto'           : false,
		'multi'          : true,
		'onComplete'     : function(event,queueID,fileObj,response,data)
		{
			var name=fileObj.name;
			var propath=fileObj.filePath;
			var prepath="C:/wamp/www";
			var path=prepath+propath;
			var html='<p><a>'+name+'&nbsp &nbsp &nbsp</a><a href="__PUBLIC__/php/down.php?name='+path+'">下载</a></p>';
			var html2='<tr><td width="350px">'+name+'&nbsp &nbsp &nbsp</td><td width="100px"> <a id="button" href="__APP__/File/down/name/'+name+'/level/{$level}">下载 </a> </td><td width="100px"><a id="button" href="__URL__/delete?name={$vo.orginalname}"   >删除</a></td></tr> ';
			$('#a').prepend(html);
			$('#add').prepend(html2);
			$( "a#button" ).button();
		}
	});
	$('a.del').click(function() {
		window.location.href=$(this).attr("href");
		});
	 
	 $('a.del').confirm({
		  msg:'确定删除吗？',
		  timeout:3000,
		  dialogShow:'fadeIn',
		  dialogSpeed:'slow',
		  buttons: {
			    ok:'是',
			    cancel:'否',
			    separator:'  ',
			    wrapper:'<button></button>'
			  }
	 });
});



</script>
</head>

<body>
<div id='div1'>
<table>
<tr>
<td><input type="file" name="uploadify" id="uploadify" />
<p><a id="button" href="javascript:jQuery('#uploadify').uploadifyUpload()">上传</a></p>
<p><a id="button" href="javascript:jQuery('#uploadify').uploadifyClearQueue()">清空队列</a></p>
</td>
<td><div id="fileQueue"></div></td></tr>
</table>
<div>
<button><a href="__APP__/File/downall/project/{$project}/level/{$level}">项目阶段文件批量下载</a></button>
</div>
<table style="background-color: #e6EEEE;">
<thead>
    <tr>
        <th width="350px">文件名称</th>
		<th colspan="2" width="200px">操作</th>
		    
		
    </tr>
    </thead>
<volist name="list" id="vo">
<tr>
<td width="350px">{$vo.orginalname}&nbsp &nbsp &nbsp</td>
<td width="100px"> <a id="button" href="__APP__/File/down/name/{$vo.orginalname}/level/{$level}">下载 </a> </td>
<td width="100px"><a id="button" class="del" href="__PUBLIC__/php/delete.php?name={$vo.orginalname}" >删除</a></td>   
</tr>
</volist>
<table id='add' style="background-color: #e6EEEE;">
</table>
</table>
</div>
<div id='div2'>
<table id='myTable' >
	<thead>
    <tr>
        <th>阶段需要上传文件</th>
    </tr>
    </thead>
     <tbody> 
     <volist name="filelist" id="vo">
     <tr>
     	<td>{$vo}</td>
     </tr>
     </volist>
     </tbody>
</table>
</div>
<!--  div style="height:1px; margin-top:-1px;clear:both;overflow:hidden;"></div>-->
</body>
</html>